Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Prevent passing a plugin that requires props without props #2937

Merged
merged 2 commits into from
Nov 24, 2020

Conversation

EvanBacon
Copy link
Contributor

const plugin = (config, props) => config

withPlugins(config, [
  [plugin, { /* props now required*/ }]
  // this will now throw a TS error as props are required.
  plugin
])

@EvanBacon EvanBacon merged commit 6d10753 into master Nov 24, 2020
@EvanBacon EvanBacon deleted the @evanbacon/config-plugins/typed-with-plugins branch November 24, 2020 17:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant